package util;

import java.sql.*;


public class test {    //添加后台超级管理员账号
    public static void main(String []args){
        Connection con = DButils.getConn();
        try {
            Statement st = con.createStatement();
            String username="admin";
            EncryptUtil en =  new EncryptUtil();
            String password =en.getMD5("123456");
            String view_power = "all";
            String sql = "insert into user (Username,Password,View_power,Verify_power,Community_power,Room_power) values('"+username+"','"+password+"','"+view_power+"',1,1,1)";
            int i = st.executeUpdate(sql);
            if(i!=0)
                System.out.print("管理员账号添加成功！");
            DButils.close(st,con);
        }catch (SQLException e){
            e.printStackTrace();
        }

    }
}
